cmake_minimum_required(VERSION 3.10.2)

project("PenSpeedDemo")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

add_library(native-lib
             SHARED
             native-lib.cpp)

target_include_directories(native-lib
        PRIVATE
        ${CMAKE_SOURCE_DIR}/include
        ${CMAKE_SOURCE_DIR}/include/skia
        ${CMAKE_SOURCE_DIR}/include/skia/core
        ${CMAKE_SOURCE_DIR}/include/skia/config
        )

add_library(libpenspeedservice SHARED IMPORTED)
set_target_properties(libpenspeedservice
        PROPERTIES IMPORTED_LOCATION
        ${CMAKE_SOURCE_DIR}/../../main/preLibs/${CMAKE_ANDROID_ARCH_ABI}/libpenspeedservice.so)

add_library(libskia_static SHARED IMPORTED)
set_target_properties(libskia_static
        PROPERTIES IMPORTED_LOCATION
        ${CMAKE_SOURCE_DIR}/../../main/preLibs/${CMAKE_ANDROID_ARCH_ABI}/libskia.a)

target_link_libraries(native-lib
    libskia_static
    z
    GLESV1_CM
    egl
    nativewindow
    libpenspeedservice
    log)